import React from 'react'
import { BrowserRouter as Router, Route,Redirect} from "react-router-dom";   
import Home from './pages/Home/index'   
import CityList from './pages/CityList/index'
import MyMap from './pages/MyMap'

class App extends React.Component{
  render(){                          
    return(                         
        <Router>
        <div className="App">
          {/* 配置默认路由 */}
          <Route path='/' exact render={()=><Redirect to='/home'/>}></Route>
          
          {/* 配置路由 */}
          <Route path='/home' component={Home}></Route>
          <Route path='/citylist' component={CityList}></Route>
          <Route path='/map' component={MyMap}></Route>
        </div>
        </Router>               
    )                               
  }                                   
}                                       
export default App                     
